
import request from '@/utils/request'
const PREFIX = '/menu'
const EMNU_API = {
    create:(data)=>{
        return request({
            url:`${PREFIX}/create`,
            method:'post',
            data:data
        })
    },
    list:(parentId,pageSize,pageNum)=>{
        return request({
            url:`${PREFIX}/list/${parentId}?pageSize=${pageSize}&pageNum=${pageNum}`,
            method:'get'
        })
    },
    delete:(id)=>{
        return request({
            url:`${PREFIX}/delete/${id}`,
            method:'get'
        })
    },
    update:(id,data)=>{
        return request({
            url:`${PREFIX}/update/${id}`,
            method:'post',
            data:data
        })
    }
}

export default EMNU_API